/*
 * 企业列表
 * @Author: along
 * @Date: 2019-12-09 16:37:00
 */
<template>
    <div class="container companyList">
        <el-tag
            type="warning"
            style="marginBottom: 10px"
        >建议:活动商品启用状态为偶数</el-tag>
        <!-- header -->
        <div class="headerBox">
            <div class="header-left">
                <div class="header-box">
                    <p class="header-box-title">状态:</p>
                    <el-select
                        v-model="header.status"
                        filterable
                        placeholder="请选择"
                        size="small"
                        @change="getTableData(1)"
                    >
                        <el-option
                            v-for="item in statusList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                        />
                    </el-select>
                </div>
                <div class="header-box">
                    <p class="header-box-title">标题:</p>
                    <el-input
                        v-model="header.title"
                        placeholder="请输入标题"
                        suffix-icon="el-icon-search"
                        size="small"
                        clearable
                        @change="getTableData(1)"
                        @keyup.native.enter="getTableData(1)"
                    />
                </div>
            </div>
            <div class="header-right">
                <el-button
                    type="primary"
                    size="small"
                    @click="fnAddActive()"
                >
                    新增活动专区
                </el-button>
            </div>
        </div>
        <!-- /header -->

        <!-- table -->
        <el-table
            :data="tableData"
            height="100%"
            style="width: 100%;"
            border
            ref="companyList"
        >
            <el-table-column
                type="index"
                width="80"
                label="序号"
                align="center"
            />
            <el-table-column
                prop="title"
                label="主标题"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
            />
            <el-table-column
                prop="info"
                label="副标题"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
            />
            <el-table-column
                prop="image"
                min-width="110"
                label="封面图"
                align="center"
            >
                <template slot-scope="scope">
                    <img
                        :src="scope.row.image"
                        class="scope-price"
                    >
                </template>
            </el-table-column>
            <el-table-column
                prop="sort"
                label="排序"
                :width="120"
            >
                <template slot-scope="scope">
                    <div class="sort-wrap">
                        {{ scope.row.sort }}
                        <span class="sort-spliter" />
                        <el-button
                            type="text"
                            class="btn-sort"
                            @click="fnEditSort(scope.row)"
                        >
                            <i class="el-icon-edit" />
                        </el-button>
                    </div>
                </template>
            </el-table-column>
            <el-table-column
                prop="create_time"
                min-width="110"
                label="创建时间"
                align="center"
            >
                <template slot-scope="scope">
                    {{ scope.row.create_time * 1000 | dateFormatter('yyyy/MM/dd HH:mm') }}
                </template>
            </el-table-column>
            <el-table-column
                prop="status"
                label="状态"
                show-overflow-tooltip
                :formatter="emptyFormatter"
                align="center"
            >
                <template slot-scope="scope">
                    <span v-if="scope.row.status == 1">已启用</span>
                    <span v-if="scope.row.status == 0">待启用</span>
                </template>
            </el-table-column>
            <el-table-column
                label="操作"
                align="center"
                :width="180"
            >
                <template slot-scope="scope">
                    <el-button
                        type="text"
                        class="curse-add"
                        @click="fnSetStatus(scope.row)"
                    >
                        <span v-if="scope.row.status == 0">启用</span>
                        <span v-if="scope.row.status== 1">取消启用</span>
                    </el-button>
                    <el-button
                        type="text"
                        class="curse-add"
                        @click="fnEditDate(scope.row)"
                    >
                        编辑
                    </el-button>
                    <el-button
                        type="text"
                        class="curse-add"
                        @click="fnDeleteDate(scope.row)"
                    >
                        删除
                    </el-button>
                </template>
            </el-table-column>
        </el-table>
        <!-- /table -->

        <!-- 活动专区 -->
        <el-dialog
            title="新增活动专区"
            :visible.sync="dialogVisible"
            width="563px"
            :close-on-click-modal="false"
        >
            <el-form
                :model="ruleForm"
                :rules="rules"
                ref="ruleForm"
                label-width="100px"
                class="demo-ruleForm"
            >
                <el-form-item
                    label="主标题"
                    prop="title"
                >
                    <el-input
                        v-model="ruleForm.title"
                        size="small"
                        placeholder="建议4个字,不超过6个字"
                        maxlength="6"

                    />
                </el-form-item>
                <el-form-item
                    label="副标题"
                    prop="info"
                >
                    <el-input
                        v-model="ruleForm.info"
                        size="small"
                        placeholder="建议8个字,不超过10个字"
                        maxlength="10"
                    />
                </el-form-item>
                <!-- 链接 -->
                <el-form-item
                    class="task-form-item"
                    size="small"
                    label="跳转链接"
                    prop="app_action"
                >
                    <div :style="{'display': 'flex'}">
                        <el-cascader
                            :props="{ expandTrigger: 'hover' }"
                            :placeholder="setJump"
                            size="small"
                            :filterable="true"
                            v-model="ruleForm.app_action"
                            :options="linkSelectData"
                            @change="handleChange()"
                            ref="myCascader"
                            style="width:300px"
                        />
                        <p
                            style="marginLeft: 10px;color:#409EFF;cursor:pointer"
                            @click="fnJumpClear()"
                        >清空链接</p>
                    </div>
                </el-form-item>
                <el-form-item
                    size="small"
                    prop="jump_url"
                    v-if="ifSelect == 'text' || ifSelect == 'select'"
                >
                    <!-- 外链输入框 -->
                    <div v-if="ifSelect == 'text' ">
                        <el-input
                            placeholder="请输入链接"
                            style="width: 300px"
                            v-model="ruleForm.jump_url"
                            @input="getJump"
                            clearable
                        >
                            <template
                                class="param"
                                slot="prepend">链接</template>
                        </el-input>
                        <p style="display:inline-block;color:#999;margin-left:12px">*需要联系技术提供</p>
                    </div>
                    <!-- 外链输入框 -->

                    <!-- 内链选择框 -->
                    <div v-if="ifSelect == 'select' ">
                        <el-select
                            v-model="ruleForm.jump_url"
                            filterable
                            placeholder="请选择"
                            @change="getJump"
                            style="width: 300px"
                        >
                            <el-option
                                v-for="item in opations"
                                :key="item.value"
                                :label="item.title"
                                :value="item.value"/>
                        </el-select>
                        <p style="display:inline-block;color:#999;margin-left:12px">*需要联系技术提供</p>
                    </div>
                    <!-- 内链输入框 -->
                </el-form-item>
                <!-- /链接 -->
                <el-form-item
                    label="序号"
                    prop="sort"
                >
                    <el-input
                        v-model="ruleForm.sort"
                        size="small"
                        placeholder="该专区会根据排序号在APP中展示,请认真填写"
                    />
                </el-form-item>
                <el-form-item
                    label="专区图片"
                    prop="image"
                >
                    <p>
                        <span style="color:#999999;fontSize:14px">*此图在首页展示,请保证图标像素清晰,</span>
                        <span
                            class="activi_model"
                            @click=" innerVisible = true "
                        >查看规范</span>
                    </p>
                    <div class="active_pic">
                        <img
                            src="//cdn.zsdx.cn/wei/images/hire/home/shop_pic.png"
                            class="active_pic_images"
                        >
                        <div class="active_upload">
                            <img
                                v-if="ruleForm.image == ''"
                                src="//cdn.zsdx.cn/wei/images/hire/home/shop_upload.png"
                                class="active_upload_icon"
                            >
                            <img
                                v-if="ruleForm.image !== ''"
                                :src="ruleForm.image"
                                class="active_pic_images"
                            >
                            <span
                                class="active_upload_text"
                                v-if="ruleForm.image == ''"
                            >点击上传</span>
                            <el-upload
                                v-if="ruleForm.image == ''"
                                :show-file-list="false"
                                :http-request="e=> {fnUploadImageOfCustomerLogo(e)}"
                                accept="image/*"
                                class="upload-demo"
                                drag
                                action="https://jsonplaceholder.typicode.com/posts/"
                            />
                            <p
                                class="active_mc"
                                v-if="ruleForm.image !== ''"
                                @mouseenter=" isIcon = true "
                                @mouseleave=" isIcon = false "
                            >
                                <i
                                    v-if="isIcon ? true : false "
                                    class="el-icon-delete"
                                    style="color:#fff"
                                    @click="fnDeletePic()"
                                />
                            </p>
                        </div>
                    </div>
                </el-form-item>
            </el-form>
            <div
                class="active_fixed"
                :style="{'display': innerVisible ? 'flex': 'none' }"
                @click=" innerVisible = false "
            >
                <i class="el-icon-circle-close"/>
                <img src="//cdn.zsdx.cn/wei/images/hire/home/shop_rules.png">
            </div>
            <span
                slot="footer"
                class="dialog-footer">
                <el-button
                    @click="dialogVisible = false"
                    size="small"
                >取 消</el-button>
                <el-button
                    type="primary"
                    size="small"
                    @click="fnSubmitActivi('ruleForm')">确 定</el-button>
            </span>
        </el-dialog>
        <!-- /活动专区 -->

        <!-- /分页 -->
        <div class="pagination-wrapper clearfix">
            <el-pagination
                background
                layout="total, prev, pager, next"
                :current-page.sync="page.now_page"
                :total="page.total_count"
                :page-size="page.page_size"
                @current-change="getTableData"
            />
        </div>
    </div>
</template>

<script>
export default {
    /**
     * @param  {Object}    authResult           //表单权限
     * @param  {Array}     tableData            //表单数据
     * @param  {Object}    page                 //表单分页
     * @param  {Object}    header               //表单检索字段
     * @param  {Array}     statusList           //表单检索字段
     * @param  {Boolean}   dialogVisible        //活动专区弹窗开关
     * @param  {Object}    ruleForm             //弹窗字段
     * @param  {Object}    rules                //弹窗字段验证规则
     * @param  {String}    isIcon               //是否显示上传图片删除icon
     * @param  {String}    type                 //编辑_新增活动专区类型
     */
    data () {
        return {
            link: '',
            linkSelectData: [],
            setJump: '请选择',
            opations: [],
            ifSelect: 'text',
            type: '',
            isIcon: false,
            activity_no: '',
            rules: {
                title: [
                    {required: true, message: '请输入主标题,不可以为空', trigger: 'blur'}
                ],
                info: [
                    {required: true, message: '请输入副标题,不可以为空', trigger: 'blur'}
                ],
                image: [
                    {required: true, message: '请上传专区图片,不可以为空', trigger: 'blur'}
                ],
                sort: [
                    {required: true, message: '请输入序号,不可以为空', trigger: 'blur'}
                ],
                app_action: [
                    {required: true, message: '请选择跳转链接,不可以为空', trigger: 'blur'}
                ],
                jump_url: [
                    {required: true, message: '请输入跳转链接,不可以为空', trigger: 'blur'}
                ]
            },
            ruleForm: {
                title: '',
                info: '',
                image: '',
                sort: '',
                app_action: '',
                jump_url: ''
            },
            innerVisible: false,
            dialogVisible: false,
            statusList: [{
                value: 99,
                label: '全部'
            },{
                value: 1,
                label: '启用'
            },{
                value: 0,
                label: '未启用'
            }],
            header: {
                status: 99,
                title: ''
            },
            page: {
                now_page: 1,
                total_count: 0,
                page_size: 0
            },
            tableData: [],
            authResult: {}
        };
    },
    watch: {
        dialogVisible (val) {
            if (!val) {
                this.ifSelect = 'text';
                this.ruleForm = {
                    title: '',
                    info: '',
                    image: '',
                    sort: '',
                    app_action: '',
                    jump_url: ''
                };
                this.$refs['ruleForm'].resetFields();
            }
        }
    },
    mounted () {
        this.authResult = this.$route.meta.authResult;
        this.fnBreadcrumb();
        this.getTableData();
        this.getappAcion();
    },
    methods: {
        /**
         * 设置表单header
         */
        fnBreadcrumb () {
            this.$store.commit('SET_HEADER', [{ title: "APP后台"},{title: '商城'},{title: "活动专区"}]);
        },

        /**
         * 获取表格数据
         */
        getTableData (page) {
            this.$post('/student/shop_activity%5Cget_list', {
                page_id: page || this.page.now_page,
                status: this.header.status,
                keyword: this.header.title
            }, resp => {
                if (resp.code == 1) {
                    this.tableData = resp.data.list;
                    this.page.now_page = resp.data.page.now_page;
                    this.page.total_count = resp.data.page.total_count;
                    this.page.page_size = resp.data.page.page_size;
                }
            });
        },

        /**
         * 设置启用状态
         */
        fnSetStatus (row) {
            let message = '';

            if (row.status == 0) {
                message = '启用成功!';
                this.$confirm('启用后该活动专区将展示在APP端，确认启用？', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    this.setStatus(row, message);
                });
            } else if (row.status == 1) {
                message = '取消成功!';
                this.$confirm('取消启用后该活动专区将不展示在APP端，确认取消？', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    this.setStatus(row, message);
                });
            }
        },
        setStatus (row, message) {
            this.$post('/student/shop_activity%5Cset_status',{
                activity_no: row.activity_no,
                status: row.status == 1 ? 0 : 1
            },resp=>{
                if (resp.code == 1) {
                    this.getTableData(this.page.now_page);
                    this.$message({
                        type: 'success',
                        message: message,
                        center: true
                    });
                } else if (resp.code == 0) {
                    this.$message({
                        type: 'warning',
                        message: resp.msg,
                        center: true
                    });
                }
            });
        },

        /**
         * 排序修改
         */
        fnEditSort (row) {
            this.$prompt('请输入排序号', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                inputPattern: /^([1-9]\d?|[1-9]\d+)$/,
                inputErrorMessage: '排序号格式不正确,请重新输入'
            }).then(({ value }) => {
                this.$post('/student/shop_activity%5Cset',{
                    activity_no: row.activity_no,
                    sort: value
                },resp=>{
                    if (resp.code == 1) {
                        this.getTableData(this.page.now_page);
                        this.$message({
                            type: 'success',
                            message: '操作成功'
                        });
                    } else if (resp.code == 0) {
                        this.$message({
                            type: 'warning',
                            message: resp.msg
                        });
                    }
                });
            });
        },

        /**
         * 新增获取专区
         */
        fnAddActive () {
            this.type = 'addActive';
            this.dialogVisible = !this.dialogVisible;
        },

        /**
         * 编辑
         */
        fnEditDate (row) {
            this.type = 'editActive';
            this.activity_no = row.activity_no;
            this.$post('/student/shop_activity%5Cget',{
                activity_no: row.activity_no
            },resp=>{
                if (resp.code == 1) {
                    let json = resp.data;
                    let param = '';
                    let type = '';
                    let jump_url = [];

                    this.ruleForm = {
                        title: resp.data.title,
                        info: resp.data.info,
                        image: resp.data.image,
                        sort: resp.data.sort
                    };

                    if (json.app_action == '') { //未添加链接
                        return;
                    }

                    let app_action = JSON.parse(resp.data.app_action);

                    this.link = app_action;

                    for(let key in app_action['param']) {
                        param = key;
                        jump_url.push(app_action['param'][key]);
                    }


                    if(JSON.stringify(this.link.param) == '{}') {
                        let app = [
                            "app_page",
                            JSON.stringify({target: this.link.target, param: '',type: ''})
                        ];

                        this.$set(this.ruleForm, 'app_action', app);
                        this.$set(this.ruleForm, 'jump_url', '');
                        this.ifSelect = '';

                        return;
                    }

                    this.$post('/student/app_action%5Cget_cascade_list', {
                        scene: 'shop'
                    }, resp => {
                        if (resp.code == 1) {
                            resp.data.list.map(item => {
                                item.target_list.map(curre => {
                                    curre.param_list.map(itm => {
                                        if (itm.param == param) {
                                            type = itm.form_type;
                                            this.getAppAction(param,type,app_action,jump_url);
                                            return;
                                        }
                                    });
                                });
                            });
                        }
                    });

                } else if (resp.code == 0){
                    this.$message({
                        type: 'warning',
                        message: resp.msg,
                        center: true
                    });
                }
            });
            this.dialogVisible = !this.dialogVisible;
        },

        /**
         * banner数据回显
         */
        getAppAction (param,type,app_action,jump_url) {
            let app = [];

            app.push(
                app_action['action'],
                JSON.stringify({target: app_action['target'],param: param,type:type})
            );

            if (type == 'select') {
                this.ifSelect = 'select';
            } else if (type == 'text') {
                this.ifSelect = 'text';
            }

            if (app_action.action == 'app_page') {
                this.$post('/student/app_action%5Cget_param_item_list',{
                    action: app_action.action,
                    target: app_action.target,
                    param: param
                },resp => {
                    if (resp.code == 1 ) {
                        this.opations = resp.data.list;
                    }
                });
            }

            this.$set(this.ruleForm, 'app_action', app);
            this.$set(this.ruleForm, 'jump_url', jump_url[0]);
        },

        /**
         * 提交活动专区
         */
        fnSubmitActivi (formName) {
            this.$refs[formName].validate((valid) => {
                if (valid) {
                    if (this.type == 'addActive') { //新增
                        this.$post('/student/shop_activity%5Cadd',{
                            title: this.ruleForm.title,
                            info: this.ruleForm.info,
                            image: this.ruleForm.image,
                            sort: this.ruleForm.sort,
                            app_action: JSON.stringify(this.link)
                        },resp=> {
                            if (resp.code == 1) {
                                this.getTableData(this.page.now_page);
                                this.dialogVisible = !this.dialogVisible;
                                this.$message({
                                    type: 'success',
                                    message: '添加成功',
                                    center: true
                                });
                            } else if (resp.code == 0) {
                                this.$message({
                                    type: 'warning',
                                    message: resp.msg,
                                    center: true
                                });
                            }
                        });
                    } else if (this.type == 'editActive') { //编辑
                        this.$post('/student/shop_activity%5Cset',{
                            activity_no: this.activity_no,
                            title: this.ruleForm.title,
                            info: this.ruleForm.info,
                            image: this.ruleForm.image,
                            sort: this.ruleForm.sort,
                            app_action: JSON.stringify(this.link)
                        },resp=> {
                            if (resp.code == 1) {
                                this.getTableData(this.page.now_page);
                                this.dialogVisible = !this.dialogVisible;
                                this.$message({
                                    type: 'success',
                                    message: '编辑成功',
                                    center: true
                                });
                            } else if (resp.code == 0) {
                                this.$message({
                                    type: 'warning',
                                    message: resp.msg,
                                    center: true
                                });
                            }
                        });
                    }
                } else {
                    console.log('error submit!!');
                    return false;
                }
            });
        },

        /**
         * 删除
         */
        fnDeleteDate (row) {
            this.$confirm('删除后该活动专区不可恢复，确认删除？', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
                this.$post('/student/shop_activity%5Cdelete',{
                    activity_no: row.activity_no
                },resp=>{
                    if (resp.code == 1) {
                        this.getTableData(this.page.now_page);
                        this.$message({
                            type: 'success',
                            message: '删除成功',
                            center: true
                        });
                    } else if (resp.code == 0) {
                        this.$message({
                            type: 'warning',
                            message: resp.msg,
                            center: true
                        });
                    }
                });
            });
        },

        /**
         * 上传图片
         */
        fnUploadImageOfCustomerLogo(e) {
            this.fnUploadImage(e, (resp) => {
                this.ruleForm.image = resp.data.url;
            }, (resp) => {
                console.log(resp.msg);
            });
        },

        fnUploadImage(e, success, error) {
            let timeTmp = new Date().getTime();
            let pic = new FormData();

            pic.append('file', e.file);
            this.$upload({
                url: '/__local/common%5Cupload',
                data: pic,
                success: resp => {
                    if (resp.code == 1) {
                        success(resp);
                    } else {
                        this.$message({
                            type: 'warning',
                            message: '上传图片失败',
                            center: true
                        });
                        error(resp);
                    }
                }
            });
        },

        /**
         * 删除图片
         */
        fnDeletePic () {
            this.ruleForm.image = '';
        },

        /**
         * app行为数据处理
         */
        getappAcion () {
            let arr = [],
                param = '',
                val = '';

            this.$post('/student/app_action%5Cget_cascade_list', {
                scene: 'shop'
            }, resp => {
                if (resp.code == 1) {
                    resp.data.list.map((item,index)=>{
                        arr.push({
                            value: item.action,
                            label: item.title,
                            children: []
                        });
                        item.target_list.map((itm, idx) => {
                            val = {
                                target: itm.target,
                                param: itm.param_list.length > 0 ? itm.param_list[0]['param'] : '',
                                type: itm.param_list.length > 0 ? itm.param_list[0]['form_type']: ''
                            };
                            arr[index].children.push({
                                value: JSON.stringify(val),
                                label: itm.title
                            });
                        });
                    });
                }
                this.linkSelectData = arr;
            });
        },

        /**
         * 清空链接
         */
        fnJumpClear () {
            this.ruleForm.jump_url = this.ruleForm.app_action = '';
            this.link = '';
        },

        /**
         * app链接数据处理 暂时只支持一个分类一个链接处理
         */
        handleChange () {
            if (this.ruleForm.app_action == undefined) {
                return;
            }

            let app_action = this.ruleForm.app_action;
            let obj = JSON.parse(app_action[1]);
            let link = {};

            // console.log(app_action, 'app_action');

            this.ruleForm.jump_url = '';
            if (app_action[0] == 'app_page') { //内部链接
                console.log(obj, 'obj');
                if (obj['type'] == 'select') {
                    this.ifSelect = 'select';
                } else if (obj['type'] == 'text') {
                    this.ifSelect = 'text';
                } else {
                    this.ifSelect = '';
                    this.link = {
                        action: app_action[0],
                        target: obj['target'],
                        param: {}
                    };
                    console.log(this.link, 'link');
                    return;
                }
                link.action = app_action[0];
                link.target = obj['target'];
                link.param = {
                    [obj['param']] : this.ruleForm.jump_url
                };
                this.$post('/student/app_action%5Cget_param_item_list',{
                    action: app_action[0],
                    target: obj['target'],
                    param: obj['param']
                },resp => {
                    if (resp.code == 1 ) {
                        this.opations = resp.data.list;
                    } else if (resp.code == 0) {
                        this.opations = [];
                    }
                });
            } else if (app_action[0] == 'link_outer') { //外部链接
                this.ifSelect = 'text';
                link.action = app_action[0];
                link.target = obj['target'];
                link.param = {
                    url : this.ruleForm.jump_url
                };
            } else {
                return;
            }

            this.link = link;
        },

        getJump (url) {
            let param = {};

            this.ruleForm.jump_url = url;
            for(let key in this.link['param']) {
                param[key] = url;
            }
            this.link['param'] = param;
            console.log(JSON.stringify(this.link), 'app_action');
        },

        /**
         * 过滤函数
         */
        emptyFormatter(row, column, val) {
            if (!val) return '--';
            return val;
        }
    }
};
</script>

<style lang="less" scoped>
    .container {
        background-color: #fff;
        padding: 10px 15px 5px 15px;
        display: flex;
        flex-direction: column;
        position: relative;
        width: 100%;
        .headerBox {
            position: relative;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            .header-left, .header-right {
                display: flex;
            }
            .header-box {
                display: flex;
                margin-right: 15px;
                align-items: center;
                color: #606266;
                margin-bottom: 10px;
                &-title {
                    margin-right: 2px;
                    white-space: nowrap;
                }
            }
        }
        /* 表单 */
        .scope-price {
            width: 50px;
            height: 50px;
        }
        .block {
            display: block;
        }
        /* 字体高亮 */
        .cursor-font {
            color: rgb(64, 158, 255);
            cursor: pointer;
        }
        /* 分页 */
        .pagination-wrapper {
            padding-top: 10px;
            padding-bottom: 10px;
            .el-pagination {
                float: right;
                padding: 0;
                background-color: transparent;
            }
        }
        //弹窗
        .activi_model {
            color: #20A0FF;
            font-size: 14px;
            text-decoration: underline;
            cursor: pointer;
        }
        .active_fixed {
            position: fixed;
            left: 0;
            top: 0;
            bottom: 0;
            right: 0;
            z-index: 99999;
            background: rgba(0,0,0,.4);
            justify-content: center;
            align-items: center;
            .el-icon-circle-close {
                color: #fff;
                position: absolute;
                right: 20px;
                top: 20px;
                font-size: 30px;
                cursor: pointer;
            }
        }
        .dialog-footer {
            width: 100%;
            display: flex;
            justify-content: center;
        }
        .active_pic {
            width: 404px;
            height: 110px;
            min-height: 110px;
            background: #F8F8F8;
            padding: 10px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            .active_pic_images {
                width: 188px;
                height: 91px;
            }
            .active_upload {
                box-sizing: border-box;
                width:188px;
                height:90px;
                border-radius:4px;
                border:1px solid rgba(217,217,217,1);
                display: flex;
                flex-direction: column;
                align-items: center;
                cursor: pointer;
                margin-left: 8px;
                position: relative;
                .upload-demo {
                    width: 188px;
                    height: 90px;
                    position: absolute;
                    left: 0;
                    top: 0;
                }
                .active_mc {
                    width: 188px;
                    height: 90px;
                    position: absolute;
                    left: 0;
                    top: 0;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    &:hover{
                        background: rgba(0,0,0,.4)
                    }
                }
                .active_upload_icon {
                    width: 18px;
                    height: 18px;
                    margin-top: 20px;
                    margin-bottom: 8px;
                }
                .active_upload_text {
                    height: 22px;
                    line-height: 22px;
                    color: #88909C;
                    font-size: 12px;
                }
            }
        }
    }
    /* 排序 */
    .sort-wrap {
        display: flex;
        align-items: center;
        cursor: pointer;
        .sort-spliter {
            width: 1px;
            height: 12px;
            background: rgba(235, 235, 235, 1);
            margin: 0 10px;
            }
            .btn-sort {
            font-size: 14px;
            line-height: 1;
            color: #ccc;
            &:hover {
                color: #20a0ff;
            }
        }
    }
</style>
<style lang="less">
    .companyList .el-table__body-wrapper .el-table__body .el-table__row td {
        border-right: none;
    }
    .companyList .el-table__header-wrapper .el-table__header .has-gutter tr th {
        border-right: none;
    }
    .companyList .el-table .el-table_1_column_6  .cell {
        position: relative;
    }
    .companyList .el-range-editor--small .el-range-separator{
        padding: 0 1px !important;
    }
    .companyList .el-upload-dragger {
        width: 180px;
        height: 90px;
        background: transparent;
        border: none;
    }
    // .companyList .el-table_1_column_8 .el-button{
    //     margin-left: 0px;
    //     height: 15px;
    //     width: 100%;
    //     text-align: center;
    //     line-height: 1px;
    // }
</style>